package com.example.yunJie.digitalSentry.service.impl;

import com.example.yunJie.digitalSentry.entity.SchedulingEntity;
import com.example.yunJie.digitalSentry.mapper.one.SchedulingMapper;
import com.example.yunJie.digitalSentry.service.SchedulingService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.io.Serializable;
import java.util.List;

@Service
@RequiredArgsConstructor
public class SchedulingServiceImpl implements SchedulingService {


    private final SchedulingMapper schedulingMapper;

    @Override
    public int insert(SchedulingEntity schedulingEntity) {
        return schedulingMapper.insert(schedulingEntity);
    }

    @Override
    public int update(SchedulingEntity schedulingEntity) {
        return schedulingMapper.update(schedulingEntity);
    }

    @Override
    public int deleteById(Serializable id) {
        return schedulingMapper.deleteById(id);
    }

    @Override
    public int deleteIdList(Long[] idList) {
        return schedulingMapper.deleteIdList(idList);
    }

    @Override
    public SchedulingEntity findId(Serializable id) {
        return schedulingMapper.findId(id);
    }

    @Override
    public SchedulingEntity findByPersonalIdAndShiftId(SchedulingEntity schedulingEntity) {
        return schedulingMapper.findByPersonalIdAndShiftId(schedulingEntity);
    }

    @Override
    public List<SchedulingEntity> findAll(SchedulingEntity schedulingEntity) {
        return schedulingMapper.findAll(schedulingEntity);
    }

    @Override
    public SchedulingEntity findByPersonalId(String id) {
        return schedulingMapper.findByPersonalId(id);
    }

    @Override
    public List<SchedulingEntity> findAllByMarketNameAndPostName(String marketName, String postName) {
        return schedulingMapper.findAllByMarketNameAndPostName(marketName,postName);
    }

    @Override
    public List<SchedulingEntity> findAllByMarketName(String marketName) {
        return schedulingMapper.findAllByMarketName(marketName);
    }

    @Override
    public List<SchedulingEntity> findAllByMarketNameAndPostNameAndShiftName(String marketName, String postName, String shiftName) {
        return schedulingMapper.findAllByMarketNameAndPostNameAndShiftName(marketName,postName,shiftName);
    }

    @Override
    public SchedulingEntity findAllByShiftName(String shiftName) {
        return schedulingMapper.findAllByShiftName(shiftName);
    }
}
